mergAVAudioSessionSetCategory
Type
command
Summary
Set the audio session category
Syntax
mergAVAudioSessionSetCategory <pCategory>, [<pMixWithOthers>], [<pDuckOthers>], [<pAllowBluetooth>], [<pDefaultToSpeaker>]
Description
Set the audio session category
Parameters
Name | Type | Description |
---|---|---|
pCategory |
| |
pMixWithOthers | (optional with "false" default) Setting this property to true allows audio mixing with other apps. Other aspects of these categories, such as their Silent switch behavior, are not affected. (The switch is called the Ring/Silent switch on iPhone.) When the audio session category changes, such as during an interruption, the value of this property reverts to false. To regain mixing behavior you must then re-set this property.
| |
pDuckOthers | (optional with "false" default) For audio session categories that allow audio mixing with other apps, specifies whether other audio should be reduced in level when your app produces sound. This property has a value of false by default. When your app is finished playing sound, be sure to set this property back to false to remove ducking.
| |
pAllowBluetooth | (optional with "false" default) Allows a paired Bluetooth device to appear as an available audio input route. By default, the value of this property is false. This property can be used to modify the "record" or "play and record" categories. Attempting to set this property to true will fail for all other categories. This property affects the "play and record" category as follows: If the audio input to the device is coming from a Bluetooth headset, setting this property to true results in audio output also going to the Bluetooth headset.
| |
pDefaultToSpeaker | (optional with "false" default) Specifies whether or not to route audio to the speaker (instead of to the receiver) when no other audio route, such as a headset, is connected. By default, the value of this property is false. This property retains its value through an audio route change (such as when plugging in or unplugging a headset), and upon interruption; it reverts to its default value only upon an audio session category change. This property can be used only with the "play and record" category.
|
Compatibility and Support
Introduced
LiveCode 8.0
OS
ios
mac
Platforms
desktop
mobile